// 表格样式设置

@import '../colorVar.less';
@import '../workStation/light.less';

// :global {
.ant-table-thead > tr:first-child > th:first-child {
  border-top-left-radius: 0 !important;
}

.ant-table-thead > tr:first-child > th:last-child {
  border-top-right-radius: 0;
}

.ant-table-thead > tr > th:first-child,
.ant-table-tbody > tr > td:first-child {
  padding-left: 16px !important;
}

// .ant-table-thead > tr > th:last-child,
// .ant-table-tbody > tr > td:last-child {
//   padding-right: 16px !important;
// }

.ant-table-thead > tr > th,
.ant-table-tbody > tr > td {
  padding: 12px 8px 11px !important;
  word-break: break-word;
  -ms-word-break: break-all;
  line-height: 16px;
}
.ant-table-tbody > tr.ant-table-row:hover > td,
.ant-table-tbody > tr > td.ant-table-cell-row-hover {
  background: @text_hover_bg !important;
}
.ant-table-tbody > tr > td {
  color: @table_body_text !important;

  &.column-right {
    text-align: right;
  }
}

.ant-table-thead > tr > th {
  background: @table_title_bgColor !important;
  color: @table_header_text !important;
  font-family: 'PingFangSC-Medium';
  &.ant-table-cell-scrollbar {
    // display: none;
    background: @main_body_bg!important;
  }
  &.column-right {
    text-align: right;
  }
}

.ant-pagination-prev .ant-pagination-item-link,
.ant-pagination-next .ant-pagination-item-link,
.ant-pagination-item,
.ant-pagination-options-quick-jumper input {
  border-radius: 2px !important;
}

.ant-table {
  font-size: 14px !important;
}

.ant-table-tbody > tr > td a {
  margin-right: 10px !important;
  color: @table_butt !important;
}

.ant-table-tbody > tr > td a[disabled] {
  color: @table_butt_disable !important;
}

.ant-table-tbody > tr > td a:last-child {
  margin-right: 0 !important;
}

.ant-table-tbody {
  .ant-table-row-expand-icon {
    color: @table_expand_icon;
    border-color: @table_expand_icon_border_bg;
  }

  .ant-table-row-expand-icon:focus,
  .ant-table-row-expand-icon:hover {
    color: @table_expand_icon;
    border-color: @theme;
  }
}

.redBg {
  background: @highlight_red !important;

  td {
    background: @highlight_red !important;
  }
}

.table-thead {
  .ant-table-thead > tr > th,
  .ant-table-tbody > tr > td {
    border-right: 1px solid @modal_line !important;
    border-bottom: 1px solid @modal_line !important;
  }
}

//暂无数据202110-14样式
.ant-table-tbody .ant-table-placeholder {
  .ant-table-cell {
    padding: 0 16px;
  }
}

.ant-table-content .ant-table-fixed-right {
  box-shadow: -5px 0 8px 0 @modal_line;
}

.ant-table-row-expand-icon {
  width: 17px !important;
  height: 17px !important;
  line-height: 12px !important;
  margin-top: 0 !important;
}

// table tbody中的 tooltip背景色
.tableTipStyle {
  .ant-tooltip-arrow {
    width: 16px;
    height: 16px;
    .ant-tooltip-arrow-content::before {
      background: @table_body_tip_bg!important;
    }
  }

  .ant-tooltip-inner {
    background: @table_body_tip_bg!important;
    color: @table_body_tip_text!important;
  }
}

// 为解决html2canvas 导出报告超过10页时，表头最后一列消失添加的样式
.exportpdfreport {
  .ant-table-thead > tr > th:last-child,
  .ant-table-tbody > tr > td:last-child {
    padding-left: 0 !important; //清空padding
    padding-right: 0 !important;
  }
}
// }
.ant-table-column-sorters {
  // display: table;
  // .ant-table-column-title {
  //   display: table-cell;
  // }
  .ant-table-column-sorter {
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
    .ant-table-column-sorter-inner {
      vertical-align: middle;
    }
  }
}
tr.ant-table-measure-row {
  visibility: collapse;
}
.ant-table-thead > tr > th:not(:last-child, .ant-table-selection-column, .ant-table-row-expand-icon-cell, [colspan])::before {
  width: 0 !important;
}
.ant-table-cell-fix-left,
.ant-table-cell-fix-right {
  background: inherit;
}
.ant-table-row {
  background: #fff;
}
